<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NumCpp: nc::imageProcessing Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NumCppLogoDoxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NumCpp
   &#160;<span id="projectnumber">2.4.0</span>
   </div>
   <div id="projectbrief">A Templatized Header Only C++ Implementation of the Python NumPy Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('namespacenc_1_1image_processing.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">nc::imageProcessing Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnc_1_1image_processing_1_1_centroid.html">Centroid</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">holds the information for a centroid  <a href="classnc_1_1image_processing_1_1_centroid.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnc_1_1image_processing_1_1_cluster.html">Cluster</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Holds the information for a cluster of pixels.  <a href="classnc_1_1image_processing_1_1_cluster.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnc_1_1image_processing_1_1_cluster_maker.html">ClusterMaker</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clusters exceedance data into contiguous groups.  <a href="classnc_1_1image_processing_1_1_cluster_maker.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnc_1_1image_processing_1_1_pixel.html">Pixel</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Holds the information for a single pixel.  <a href="classnc_1_1image_processing_1_1_pixel.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afabcede2d9e7e67cc80fc822b30d70e6"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:afabcede2d9e7e67cc80fc822b30d70e6"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; bool &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1image_processing.html#afabcede2d9e7e67cc80fc822b30d70e6">applyThreshold</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inImageArray, dtype inThreshold)</td></tr>
<tr class="separator:afabcede2d9e7e67cc80fc822b30d70e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbb987932dd69ec19029228e065c6603"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:adbb987932dd69ec19029228e065c6603"><td class="memTemplItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classnc_1_1image_processing_1_1_centroid.html">Centroid</a>&lt; dtype &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1image_processing.html#adbb987932dd69ec19029228e065c6603">centroidClusters</a> (const std::vector&lt; <a class="el" href="classnc_1_1image_processing_1_1_cluster.html">Cluster</a>&lt; dtype &gt; &gt; &amp;inClusters)</td></tr>
<tr class="separator:adbb987932dd69ec19029228e065c6603"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b0730e1067dc755ee1fa2ecf280c14f"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a9b0730e1067dc755ee1fa2ecf280c14f"><td class="memTemplItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classnc_1_1image_processing_1_1_cluster.html">Cluster</a>&lt; dtype &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1image_processing.html#a9b0730e1067dc755ee1fa2ecf280c14f">clusterPixels</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inImageArray, const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; bool &gt; &amp;inExceedances, <a class="el" href="namespacenc.html#a9ba5a0aa26753a185985b8273fb9062d">uint8</a> inBorderWidth=0)</td></tr>
<tr class="separator:a9b0730e1067dc755ee1fa2ecf280c14f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a874d0f4174d10763002fdd70f190595b"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a874d0f4174d10763002fdd70f190595b"><td class="memTemplItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classnc_1_1image_processing_1_1_centroid.html">Centroid</a>&lt; dtype &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1image_processing.html#a874d0f4174d10763002fdd70f190595b">generateCentroids</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inImageArray, double inRate, const std::string &amp;inWindowType, <a class="el" href="namespacenc.html#a9ba5a0aa26753a185985b8273fb9062d">uint8</a> inBorderWidth=0)</td></tr>
<tr class="separator:a874d0f4174d10763002fdd70f190595b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a356989d12dda6e1b0748d22d50d4ecaa"><td class="memTemplParams" colspan="2">template&lt;typename dtype &gt; </td></tr>
<tr class="memitem:a356989d12dda6e1b0748d22d50d4ecaa"><td class="memTemplItemLeft" align="right" valign="top">dtype&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacenc_1_1image_processing.html#a356989d12dda6e1b0748d22d50d4ecaa">generateThreshold</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;inImageArray, double inRate)</td></tr>
<tr class="separator:a356989d12dda6e1b0748d22d50d4ecaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a896adf0319f58a2f44cbf3dfaf550fe2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; bool &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacenc_1_1image_processing.html#a896adf0319f58a2f44cbf3dfaf550fe2">windowExceedances</a> (const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; bool &gt; &amp;inExceedances, <a class="el" href="namespacenc.html#a9ba5a0aa26753a185985b8273fb9062d">uint8</a> inBorderWidth) noexcept</td></tr>
<tr class="separator:a896adf0319f58a2f44cbf3dfaf550fe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="afabcede2d9e7e67cc80fc822b30d70e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afabcede2d9e7e67cc80fc822b30d70e6">&#9670;&nbsp;</a></span>applyThreshold()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;bool&gt; nc::imageProcessing::applyThreshold </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inImageArray</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">dtype&#160;</td>
          <td class="paramname"><em>inThreshold</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Applies a threshold to an image</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inImageArray</td><td></td></tr>
    <tr><td class="paramname">inThreshold</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classnc_1_1_nd_array.html" title="Holds 1D and 2D arrays, the main work horse of the NumCpp library.">NdArray</a> of booleans of pixels that exceeded the threshold </dd></dl>

</div>
</div>
<a id="adbb987932dd69ec19029228e065c6603"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbb987932dd69ec19029228e065c6603">&#9670;&nbsp;</a></span>centroidClusters()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classnc_1_1image_processing_1_1_centroid.html">Centroid</a>&lt;dtype&gt; &gt; nc::imageProcessing::centroidClusters </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="classnc_1_1image_processing_1_1_cluster.html">Cluster</a>&lt; dtype &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>inClusters</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Center of Mass centroids clusters</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inClusters</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::vector&lt;Centroid&gt; </dd></dl>

</div>
</div>
<a id="a9b0730e1067dc755ee1fa2ecf280c14f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b0730e1067dc755ee1fa2ecf280c14f">&#9670;&nbsp;</a></span>clusterPixels()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classnc_1_1image_processing_1_1_cluster.html">Cluster</a>&lt;dtype&gt; &gt; nc::imageProcessing::clusterPixels </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inImageArray</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; bool &gt; &amp;&#160;</td>
          <td class="paramname"><em>inExceedances</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacenc.html#a9ba5a0aa26753a185985b8273fb9062d">uint8</a>&#160;</td>
          <td class="paramname"><em>inBorderWidth</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Clusters exceedance pixels from an image</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inImageArray</td><td></td></tr>
    <tr><td class="paramname">inExceedances</td><td></td></tr>
    <tr><td class="paramname">inBorderWidth</td><td>border to apply around exceedance pixels post clustering (default 0) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::vector&lt;Cluster&gt; </dd></dl>

</div>
</div>
<a id="a874d0f4174d10763002fdd70f190595b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a874d0f4174d10763002fdd70f190595b">&#9670;&nbsp;</a></span>generateCentroids()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classnc_1_1image_processing_1_1_centroid.html">Centroid</a>&lt;dtype&gt; &gt; nc::imageProcessing::generateCentroids </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inImageArray</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>inRate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>inWindowType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacenc.html#a9ba5a0aa26753a185985b8273fb9062d">uint8</a>&#160;</td>
          <td class="paramname"><em>inBorderWidth</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Generates a list of centroids givin an input exceedance rate</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inImageArray</td><td></td></tr>
    <tr><td class="paramname">inRate</td><td>exceedance rate </td></tr>
    <tr><td class="paramname">inWindowType</td><td>(string "pre", or "post" for where to apply the exceedance windowing) </td></tr>
    <tr><td class="paramname">inBorderWidth</td><td>border to apply (default 0) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>std::vector&lt;Centroid&gt; </dd></dl>

</div>
</div>
<a id="a356989d12dda6e1b0748d22d50d4ecaa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a356989d12dda6e1b0748d22d50d4ecaa">&#9670;&nbsp;</a></span>generateThreshold()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename dtype &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">dtype nc::imageProcessing::generateThreshold </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; dtype &gt; &amp;&#160;</td>
          <td class="paramname"><em>inImageArray</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>inRate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Calculates a threshold such that the input rate of pixels exceeds the threshold. Really should only be used for integer input array values. If using floating point data, user beware...</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inImageArray</td><td></td></tr>
    <tr><td class="paramname">inRate</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>dtype </dd></dl>

</div>
</div>
<a id="a896adf0319f58a2f44cbf3dfaf550fe2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a896adf0319f58a2f44cbf3dfaf550fe2">&#9670;&nbsp;</a></span>windowExceedances()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt;bool&gt; nc::imageProcessing::windowExceedances </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classnc_1_1_nd_array.html">NdArray</a>&lt; bool &gt; &amp;&#160;</td>
          <td class="paramname"><em>inExceedances</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacenc.html#a9ba5a0aa26753a185985b8273fb9062d">uint8</a>&#160;</td>
          <td class="paramname"><em>inBorderWidth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Window expand around exceedance pixels</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">inExceedances</td><td></td></tr>
    <tr><td class="paramname">inBorderWidth</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classnc_1_1_nd_array.html">NdArray&lt;bool&gt;</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacenc.html">nc</a></li><li class="navelem"><a class="el" href="namespacenc_1_1image_processing.html">imageProcessing</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
